package com.diaohw.module.file.obj.convert;

import com.diaohw.module.file.obj.dto.OcrDTO;
import com.diaohw.module.file.obj.entity.OcrDO;
import com.diaohw.module.file.obj.vo.OcrVO;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <p>
 * 文件ORC识别数据 类型转换
 * </p>
 *
 * @author D-Hw
 * @since 2024-09-20
 */
@Mapper
public interface OcrConvert {

    OcrConvert INSTANCE = Mappers.getMapper(OcrConvert.class);

    /**
     * dto to entity
     */
    @InheritConfiguration
    OcrDO dtoToEntity(OcrDTO dto);

    /**
     * entity to dto
     */
    @InheritConfiguration
    OcrDTO entityToDto(OcrDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    OcrVO entityToVo(OcrDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    List<OcrVO> entityToVo(List<OcrDO> list);


}

